package com.qianbao.service.money;

import com.qianbao.components.excepion.CommonException;
import com.qianbao.domain.money.CoinNumberTipsEntity;

import java.util.Map;

public interface CoinService {


    /**
     * 更新用户的金币信息
     * @param customId
     * @param coin
     * @throws CommonException
     */
    public void saveUserCoin(String customId,String coin) throws CommonException;


    /**
     * 查询用户金币数量
     * @param custom_id
     * @return
     * @throws CommonException
     */
    public int findUserCoin(String custom_id) throws CommonException;


    /**
     * 把阅读时长转换为金币
     * @param customId
     * @throws CommonException
     */
    public Map exchangeReadtimeToCoin(String customId) throws CommonException;


    /**
     * 终极接口，保存用户的金币和提示信息
     * @param entity
     * @throws CommonException
     */
    public void saveUserCoinNumberTips(CoinNumberTipsEntity entity) throws CommonException;


}
